﻿namespace Skymate.Mvc.Controllers
{
    using System.Web.Mvc;

    using Castle.MicroKernel.Registration;

    using Skymate.Core;
    using Skymate.Engines.DependencyManagement;

    public class ControllerConventionalRegistrar : IConventionalDependencyRegistrar
    {
        /// <inheritdoc/>
        public void RegisterAssembly(IConventionalRegistrationContext context)
        {
            context.IocManager.IocContainer.Register(
                Classes.FromAssembly(context.Assembly)
                    .BasedOn<Controller>()
                    .LifestyleTransient()
                );

        }
    }
}